import 'package:flutter/material.dart';
import '../views/listviewdemo/ListViewDemoPage.dart';
import '../views/toast/ToastDemoPage.dart';
import '../views/buttonstyle/ButtonStyleDemoPage.dart';
import '../views/dartplugin/DartPluginDemoPage.dart';
import '../views/blue/BlueDemoPage.dart';
import '../views/color/CircleColorPickerDemoPage.dart';

class FivePage extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return new Scaffold(

        resizeToAvoidBottomPadding: false,//输入框抵住键盘

        body: new SingleChildScrollView(

          child: new Column(

            children: <Widget>[

              new Padding(
                padding: new EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 20.0),
                child: new Row(
                  children: <Widget>[
                    new Expanded(

                      child: new RaisedButton(
                        onPressed: (){

//                          Navigator.of(context).pop();//结束当前页面
                          Navigator.push(
                            context,
                            new MaterialPageRoute(builder: (context) => new ListViewDemoPage()),
                          );
                        },
                        //通过控制 Text 的边距来控制控件的高度
                        child: new Padding(

                          padding: new EdgeInsets.fromLTRB(10.0, 10.0, 0.0, 10.0),
                          child: new Text("进入ListView测试页面"),

                        ),
                        color: Colors.deepOrange,
                      ),
                    ),
                  ],
                ),
              ),

              new Padding(
                padding: new EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 20.0),
                child: new Row(
                  children: <Widget>[
                    new Expanded(

                      child: new RaisedButton(
                        onPressed: (){

//                          Navigator.of(context).pop();//结束当前页面
                          Navigator.push(
                            context,
                            new MaterialPageRoute(builder: (context) => new ToastDemoPage()),
                          );
                        },
                        //通过控制 Text 的边距来控制控件的高度
                        child: new Padding(

                          padding: new EdgeInsets.fromLTRB(10.0, 10.0, 0.0, 10.0),
                          child: new Text('进入第三方框架FlutterToast测试页面:Toast'),

                        ),
                        color: Colors.deepOrange,
                      ),
                    ),
                  ],
                ),
              ),

              new Padding(
                padding: new EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 20.0),
                child: new Row(
                  children: <Widget>[
                    new Expanded(

                      child: new RaisedButton(

                        onPressed: (){

//                          Navigator.of(context).pop();//结束当前页面
                          Navigator.push(
                            context,
                            new MaterialPageRoute(builder: (context) => new ButtonStyleDemoPage()),
                          );
                        },
                        //通过控制 Text 的边距来控制控件的高度
                        child: new Padding(

                          padding: new EdgeInsets.fromLTRB(10.0, 10.0, 0.0, 10.0),
                          child: new Text('button样式测试'),

                        ),
                        color: Colors.deepOrange,

                      ),
                    ),
                  ],
                ),
              ),

              new Padding(
                padding: new EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 20.0),
                child: new Row(
                  children: <Widget>[
                    new Expanded(

                      child: new RaisedButton(

                        onPressed: (){

//                          Navigator.of(context).pop();//结束当前页面
                          Navigator.push(
                            context,
                            new MaterialPageRoute(builder: (context) => new DartPluginDemoPage()),
                          );
                        },
                        //通过控制 Text 的边距来控制控件的高度
                        child: new Padding(

                          padding: new EdgeInsets.fromLTRB(10.0, 10.0, 0.0, 10.0),
                          child: new Text('dart插件开发'),

                        ),
                        color: Colors.deepOrange,

                      ),
                    ),
                  ],
                ),
              ),

              new Padding(
                padding: new EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 20.0),
                child: new Row(
                  children: <Widget>[
                    new Expanded(

                      child: new RaisedButton(

                        onPressed: (){

//                          Navigator.of(context).pop();//结束当前页面
                          Navigator.push(
                            context,
                            new MaterialPageRoute(builder: (context) => new BlueDemoPage()),
                          );
                        },
                        //通过控制 Text 的边距来控制控件的高度
                        child: new Padding(

                          padding: new EdgeInsets.fromLTRB(10.0, 10.0, 0.0, 10.0),
                          child: new Text('blue第三方插件demo'),

                        ),
                        color: Colors.deepOrange,

                      ),
                    ),
                  ],
                ),
              ),

              new Padding(
                padding: new EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 20.0),
                child: new Row(
                  children: <Widget>[
                    new Expanded(

                      child: new RaisedButton(

                        onPressed: (){

//                          Navigator.of(context).pop();//结束当前页面
                          Navigator.push(
                            context,
                            new MaterialPageRoute(builder: (context) => new BlueDemoPage()),
                          );
                        },
                        //通过控制 Text 的边距来控制控件的高度
                        child: new Padding(

                          padding: new EdgeInsets.fromLTRB(10.0, 10.0, 0.0, 10.0),
                          child: new Text('显示长文本'),

                        ),
                        color: Colors.deepOrange,

                      ),
                    ),
                  ],
                ),
              ),
              new Padding(
                padding: new EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 20.0),
                child: new Row(
                  children: <Widget>[
                    new Expanded(

                      child: new RaisedButton(

                        onPressed: (){

//                          Navigator.of(context).pop();//结束当前页面
                          Navigator.push(
                            context,
                            new MaterialPageRoute(builder: (context) => new BlueDemoPage()),
                          );
                        },
                        //通过控制 Text 的边距来控制控件的高度
                        child: new Padding(

                          padding: new EdgeInsets.fromLTRB(10.0, 10.0, 0.0, 10.0),
                          child: new Text('显示富媒体'),

                        ),
                        color: Colors.deepOrange,

                      ),
                    ),
                  ],
                ),
              ),
              new Padding(
                padding: new EdgeInsets.fromLTRB(10.0, 20.0, 10.0, 20.0),
                child: new Row(
                  children: <Widget>[
                    new Expanded(

                      child: new RaisedButton(

                        onPressed: (){

//                          Navigator.of(context).pop();//结束当前页面
                          Navigator.push(
                            context,
                            new MaterialPageRoute(builder: (context) => new CircleColorPickerDemoPage()),
                          );
                        },
                        //通过控制 Text 的边距来控制控件的高度
                        child: new Padding(

                          padding: new EdgeInsets.fromLTRB(10.0, 10.0, 0.0, 10.0),
                          child: new Text('自定义组件圆形取色器'),

                        ),
                        color: Colors.deepOrange,

                      ),
                    ),
                  ],
                ),
              ),

            ],

          ),

        )
    );
  }
}